<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" placeholder="按下回车提升输入" @keyup.ctrl.y="showInfo"> 
         <!-- 键盘事件的连写 -->
    </div>
    <script>
        Vue.config.productionTip = false
        Vue.config.keyCodes.huiche = 13;     //vue自定义键名
        var v = new Vue({
            el:'#app',
            data:{},
            methods:{
                showInfo(e){
                    // if(e.keyCode !== 13) return
                    console.log(e.target.value);
                }
            }
        })
        
    </script>
</body>
</html>